package com.report.controller;

import com.report.dto.Response;
import com.report.entity.AccountBookData;
import com.report.service.AccountBookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 账套数据
 */
@RestController
@RequestMapping("/api/accountBook")
public class AccountBookController {


    @Autowired
    private AccountBookService accountBookService;

    /**
     * 保存账套数据
     *
     * @param accountBookData
     * @return
     */
    @PostMapping("/save")
    public Response save(@RequestBody AccountBookData accountBookData) {
        return accountBookService.save(accountBookData);
    }

    /**
     * 查询账套数据
     *
     * @param accountBookData
     * @return
     */
    @PostMapping("/query")
    public Response get(@RequestBody AccountBookData accountBookData) {
        return accountBookService.get(accountBookData);
    }


}
